<?

if(isset($_POST['Submit']))

{

$sql="UPDATE siteadmin set facebook='".$_REQUEST['facebook']."',flickr='".$_REQUEST['flickr']."',twitter='".$_REQUEST['twitter']."', youtube_video = '".$_REQUEST['youtube_video']."', youtube_link = '".$_REQUEST['youtube_link']."'";

		

			$result= mysql_query($sql) or die(mysql_error());

			if($result)

			$msg="Update Complete!";

	

}

?>

<script language="javascript">

function checkblank()

{

	if(document.getElementById("oldpass").value=='')

	{

		alert("Please fill old password field");

		document.getElementById("oldpass").focus();

		return false;

	}

	/*else 

	if(document.getElementById("newpass").value=='')

	{

		alert("Please fill new password field");

		document.getElementById("newpass").focus();

		return false;

	}

	else if(document.getElementById("confirmpass").value=='')

	{

		alert("Please fill confirm password field");

		document.getElementById("confirmpass").focus();

		return false;

	}*/

	else if(document.getElementById("confirmpass").value!=document.getElementById("newpass").value)

	{

		alert("New password and confirm password should be same");

		document.getElementById("confirmpass").focus();

		return false;

	}

}

</script>

<?

	$s1 = "select * from siteadmin where 1";

	$q1 = mysql_query($s1) or die($s1);

	$r1 = mysql_fetch_array($q1);

?>

<form action="" method="post"  name="form1" id="form1" enctype="multipart/form-data">

  <table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">

    <tr>

      <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>

    

	<tr>

      <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>

    <tr>

      <td colspan="3" align="center" class="Redsmalltext"><?php echo $msg?></td>
    </tr>

	 <tr>

      <td width="29%" align="right" class="Main_heading3"><span class="smalltext">Face Book:&nbsp;&nbsp;</span></td>

      <td width="45%" align="left" class="EM_data_table_inputarea11"><input name="facebook" type="text" class="txtField1" id="facebook" size="45" value="<?=$r1["facebook"]?>"> </td>

<td width="26%"><img src="<?=$path;?>images/facebook.gif" border="0" height="15" width="15"/></td>
    </tr>

	<tr>

      <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>

	

	

	<tr>

      <td width="29%" align="right" class="Main_heading3"><span class="smalltext">Flickr:&nbsp;&nbsp;</span></td>

      <td width="45%" align="left" class="EM_data_table_inputarea11"><input name="flickr" type="text" class="txtField1" id="flickr" size="45" value="<?=$r1["flickr"]?>"> </td>

	<td width="26%"><img src="<?=$path;?>images/flickr.png" border="0" height="15" width="15"/></td>
    </tr>

	<tr>

      <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>

	<tr>

      <td width="29%" align="right" class="Main_heading3"><span class="smalltext">Twitter:&nbsp;&nbsp;</span></td>

      <td width="45%" align="left" class="EM_data_table_inputarea11"><input name="twitter" type="text" class="txtField1" id="twitter" size="45" value="<?=$r1["twitter"]?>"> </td>
	  <td width="26%"><img src="<?=$path;?>images/twitter.gif" border="0" height="15" width="15"/></td>
    </tr>



	<tr>
	  <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>
	<tr>
	  <td align="right" class="Main_heading3"><span class="smalltext">Youtube:&nbsp;&nbsp;</span></td>
      <td align="left" class="Redsmalltext"><span class="EM_data_table_inputarea11">
        <input name="youtube_link" type="text" class="txtField1" id="youtube_link" size="45" value="<?=$r1["youtube_link"]?>" />
      </span></td>
      <td align="center" class="Redsmalltext">&nbsp;</td>
	</tr>
	<tr>
	  <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>
	<tr>
	  <td align="right" class="Main_heading3"><span class="smalltext">Youtube Video:&nbsp;&nbsp;</span></td>
      <td align="left" class="Redsmalltext"><span class="EM_data_table_inputarea11">
        <input name="youtube_video" type="text" class="txtField1" id="youtube_video" size="45" value="<?=$r1["youtube_video"]?>" />
      </span></td>
      <td align="center" class="Redsmalltext">&nbsp;</td>
	</tr>
	<tr>

      <td colspan="3" align="center" class="Redsmalltext">&nbsp;</td>
    </tr>

	

	

	

    <tr>

      <td height="30">&nbsp;</td>

      <td align="left" class="EM_data_table_inputarea11"><input type="submit" name="Submit" value="Update" onClick="return checkblank();">      </td>
    </tr>
  </table>

</form>